package main

import "fmt"

func printNums(myArray []int) {
	// 引用传递
	// _ 表示匿名的变量
	for _, value := range myArray {
		fmt.Println("value = ", value)
	}

	myArray[0] = 100
}

func main() {

	myArray := []int{1, 2, 3, 4} // 动态数组，切片 slice
	fmt.Println("myArray type is %T\n", myArray)

	printNums(myArray)

	fmt.Println(" ===== ")

	for _, value := range myArray {
		fmt.Println("value = ", value)
	}

}
